<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>{$title}</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="{$description}">
        <meta name="author" content="{$author}">
        <meta property="wb:webmaster" content="cc95ed7fc79b6662" />
        <meta property="qc:admins" content="2140742151571651631611006375" />

        <!-- Le styles -->
        <link href="../Public/css/bootstrap.min.css" rel="stylesheet">
        <link href="../Public/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="../Public/css/style.css" rel="stylesheet">
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

    </head>

    <body data-spy="scroll" data-target=".subnav" data-offset="50">

        <div class="container">
            <div class="row">
                <div class="span12 top">
                    <div class="span2" style="text-align: left">广州 [切换城市]</div><div class="span3 offset6"> <a href="/quwanma.apk">安卓版</a> | <a href="/profile/login">登录</a> | <a href="/profile/register">免费注册</a> | <a href="/help">帮助</a></div>
                </div>
            </div>

            <div id="header">

                <section id="logo">   
                    <div class="page-header">
                        <div class="row">
                            <div class="span4">
                                <h1>去玩吗？</h1>
                            </div>
                            <div class="span6">
                                {$weather}
                            </div>
                            <div class="span2">
                                <a href="#" class="btn  btn-large  btn-success"><i class="icon-pencil icon-white"></i>发布活动</a>
                            </div>
                        </div>

                    </div>
                </section>

            </div>

            <section id="forms">
                <div class="row ">
                    <div class="span12 row-title">
                        <h4>首页</h4>
                    </div>
                </div>

                <div class="row">
                    <div class="span2">

                        <div style="padding: 8px 0;" class="well">
                            <ul class="nav nav-list">
                                <li class="active"><a>会员中心</a></li>
                                <include file="Public:menu" />
                            </ul>

                        </div>

                    </div>
                    <div class="span7">
                        <script src="__ROOT__/Public/Js/xheditor/xheditor-zh-cn.min.js"></script>
                        <script type="text/javascript" src="__ROOT__/Public/Js/dateinput/jquery.date_input.pack.js"></script>
                        <link rel="stylesheet" href="__ROOT__/Public/Js/dateinput/date_input.css" type="text/css">

                        <script>
                            $(function() {
                                //$( ".datepicker" ).datepicker({dateFormat: 'yy-m-d'});
                                $(".datepicker").date_input();
                            });

                        </script>

                        <script type="text/javascript">
                            $(function(){
                                $('#province').change(function(){
                                    $("#city").load("__URL__/getcity", {provinceid: this.value}, function(){
                                        $('#city').show();
                                    });
                                })
                                $('#city').change(function(){
                                    $("#region").load("__URL__/getregion", {cityid: this.value}, function(){
                                        $('#region').show();
                                    });
                                })
                            })
    
                        </script>
                        <script type="text/javascript">
                            $(pageInit);
                            var editor;
                            function pageInit()
                            {
                                var plugins={
                                    Code:{c:'btnCode',t:'插入代码',h:1,e:function(){
                                            var _this=this;
                                            var htmlCode='<div><select id="xheCodeType"><option value="html">HTML/XML</option><option value="js">Javascript</option><option value="css">CSS</option><option value="php">PHP</option><option value="java">Java</option><option value="py">Python</option><option value="pl">Perl</option><option value="rb">Ruby</option><option value="cs">C#</option><option value="c">C++/C</option><option value="vb">VB/ASP</option><option value="">其它</option></select></div><div><textarea id="xheCodeValue" wrap="soft" spellcheck="false" style="width:300px;height:100px;" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="确定" /></div>';			var jCode=$(htmlCode),jType=$('#xheCodeType',jCode),jValue=$('#xheCodeValue',jCode),jSave=$('#xheSave',jCode);
                                            jSave.click(function(){
                                                _this.loadBookmark();
                                                _this.pasteHTML('<pre class="prettyprint lang-'+jType.val()+'">'+_this.domEncode(jValue.val())+'</pre>');
                                                _this.hidePanel();
                                                return false;	
                                            });
                                            _this.showDialog(jCode);
                                        }},
                                    map:{c:'btnMap',t:'插入Google地图',e:function(){
                                            var _this=this;
                                            _this.showIframeModal('Google 地图','__ROOT__/Public/Js/xheditor/demos/googlemap/googlemap.html',
                                            function(v){_this.pasteHTML('<img src="'+v+'" />');},538,404);
                                        }}
                                };
                                editor=$('#content').xheditor({upLinkUrl:'__ROOT__/Public/Js/xheditor/demos/upload.php?immediate=1',
                                    upImgUrl:'__ROOT__/Public/Js/xheditor/demos/upload.php?immediate=1',
                                    upFlashUrl:'__ROOT__/Public/Js/xheditor/demos/upload.php?immediate=1',
                                    upMediaUrl:'__ROOT__/Public/Js/xheditor/demos/upload.php?immediate=1',emots:{
                                        msn:{name:'MSN',count:40,width:22,height:22,line:8},
                                        pidgin:{name:'Pidgin',width:22,height:25,line:8,list:{smile:'微笑',cute:'可爱',wink:'眨眼',laugh:'大笑',victory:'胜利',sad:'伤心',cry:'哭泣',angry:'生气',shout:'大骂',curse:'诅咒',devil:'魔鬼',blush:'害羞',tongue:'吐舌头',envy:'羡慕',cool:'耍酷',kiss:'吻',shocked:'惊讶',sweat:'汗',sick:'生病',bye:'再见',tired:'累',sleepy:'睡了',question:'疑问',rose:'玫瑰',gift:'礼物',coffee:'咖啡',music:'音乐',soccer:'足球',good:'赞同',bad:'反对',love:'心',brokenheart:'伤心'}},
                                        ipb:{name:'IPB',width:20,height:25,line:8,list:{smile:'微笑',joyful:'开心',laugh:'笑',biglaugh:'大笑',w00t:'欢呼',wub:'欢喜',depres:'沮丧',sad:'悲伤',cry:'哭泣',angry:'生气',devil:'魔鬼',blush:'脸红',kiss:'吻',surprised:'惊讶',wondering:'疑惑',unsure:'不确定',tongue:'吐舌头',cool:'耍酷',blink:'眨眼',whistling:'吹口哨',glare:'轻视',pinch:'捏',sideways:'侧身',sleep:'睡了',sick:'生病',ninja:'忍者',bandit:'强盗',police:'警察',angel:'天使',magician:'魔法师',alien:'外星人',heart:'心动'}}
                                    },plugins:plugins,loadCSS:'<style>pre{margin-left:2em;border-left:3px solid #CCC;padding:0 1em;}</style>',shortcuts:{'ctrl+enter':submitForm}});
                            }
                            function submitForm(){ $('#proform').submit(); }
                        </script>
                        <div class="row-fluid">
                            <switch name="dsp">
                            <case value="add">
                                <form class="form-horizontal" id="proform" name="proform" method="post" action="__URL__/doadd" enctype="multipart/form-data">
                                    <fieldset>
                                        <legend>添加活动</legend>
                                        <div class="control-group">
                                            <label for="input01" class="control-label">活动名称</label>
                                            <div class="controls">
                                                <input type="text" id="input01" name="title" class="input-xlarge">
                                                <p class="help-block"></p>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label for="input01" class="control-label">开始时间</label>
                                            <div class="controls">
                                                <input type="text" name="starttime"  id="input01" class="input-xlarge datepicker">
                                                <p class="help-block"></p>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label for="input01" class="control-label">结束时间</label>
                                            <div class="controls">
                                                <input type="text" id="input01" name="endtime"   class="input-xlarge datepicker">
                                                <p class="help-block"></p>
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label for="select01" class="control-label">活动类别</label>
                                            <div class="controls">
                                                <select name="cateId" id="select01">

                                                    <volist name="cats" id="data"  >
                                                        <option value="{$key}">{$data}</option>
                                                    </volist>
                                                </select>

                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label for="select01" class="control-label">活动地点</label>
                                            <div class="controls">
                                                <select  class="comboBox" id="province"  name="province" width="100">
                                                    <option value="-1">请选择</option>
                                                    <volist name="provinces" id="province" >
                                                        <option value="{$province.id}">{$province.name}</option>
                                                    </volist>
                                                </select>
                                                <select class="comboBox"  id="city" name="city" width="100" style="display:none" >

                                                </select>
                                                <select class="comboBox" id="region" name="region" width="100"  style="display:none">

                                                </select>
                                            </div>
                                        </div>  
                                        <div class="control-group">
                                            <label for="fileInput" class="control-label">活动照片</label>
                                            <div class="controls">
                                                <input type="file" id="fileInput" name="attachment" class="input-file">
                                            </div>
                                        </div>
                                        <div class="control-group">
                                            <label for="textarea" class="control-label">说明</label>
                                            <div class="controls">
                                                <textarea rows="3" id="textarea" name="content" class="input-xlarge"></textarea>
                                            </div>
                                        </div>
                                        <div class="form-actions">
                                            <input type="hidden" name="memberId" value="{$memberId}"/>
                                            <button class="btn btn-primary" type="submit">添加</button>

                                        </div>
                                    </fieldset>
                                </form>

                            </case>
                            <case value="edit">
                                <h4>编辑活动</h4>
                                <form name="proform" method="post" action="__URL__/doedit" enctype="multipart/form-data">
                                    <table border="0" cellspacing="1" class="tb-b">
                                        <tr>
                                            <th>ID</th>
                                            <td>{$aid}<input type="hidden" name="aid" value="{$aid}"></td>
                                        </tr>
                                        <tr>
                                            <th>活动名称</th>
                                            <td><input type="text" name="title" value="{$title}" class="input-b" /></td>
                                        </tr>
                                        <tr>
                                            <th>活动类别</th>
                                            <td>
                                                <select name="cid">
                                                    <volist name="cats" id="c">
                                                        <if condition="$c.id eq $id">
                                                            <option value="{$c.id}" selected="selected">{$c.name}</option>
                                                            <else />
                                                            <option value="{$c.id}">{$c.name}</option>
                                                        </if>
                                                    </volist>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>活动图片</th>
                                            <td><input type="file"  name="attachment" value="{$attachment}" /> 当前图片：<a href="#" onmouseover="tooltip.show('<img src={$attachment|getProImg = ###} height=160 />');" onmouseout=tooltip.hide(); >{$attachment}</a></td>
                                        </tr>
                                        <tr>
                                            <th>活动介绍</th>
                                            <td><html:editor id="editor" name="content" type="FCKeditor" content="{$content}" /></td>
                                        </tr>
                                        <tr>
                                            <th>发布时间</th>
                                            <td><input type="text" name="postdate" value="{$postdate|date='Y-n-j H:i:s',###}" /></td>
                                        </tr>
                                    </table>
                                    <div align="center"><input type="submit" value="提交" /></div>
                                </form>
                            </case>
                            <default />
                            </switch>
                        </div>

                    </div>
                    <div class="span3"></div>

                </div>

            </section>

            <!-- Footer
             ================================================== -->
            <footer class="footer">
                <p class="pull-right"><a href="#">返回顶部</a></p>
                <p>©2011-2012 去玩吗？<a href="http://weibo.com/33kuai" target="_blank">去玩吗新浪微博</a> | 关于去玩吗 | 开放API | 意见反馈 | 联系我</p>
            </footer>

        </div><!-- /container -->

    </body>
</html>
